Skip to content

Use importlib.metadata for version, single source of truth#40

Merged
dannywillems merged 2 commits intomainfrom
copilot/deduplicate-version-info
Feb 8, 2026
Merged

Use importlib.metadata for version, single source of truth#40
dannywillems merged 2 commits intomainfrom
copilot/deduplicate-version-info

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Summary

  • Replace hardcoded __version__ = "1.4.0" with importlib.metadata.version("l9format")
  • Version is now defined only in pyproject.toml

Closes #22

Test plan

  • All 38 tests pass
  • from l9format import __version__ returns the installed package version
  • mypy and ruff pass

@dannywillems
Copy link
Contributor

@copilot also add a changelog entry

Remove hardcoded version string from __init__.py and use
importlib.metadata.version() instead. Version is now defined
only in pyproject.toml.

Closes #22
@dannywillems dannywillems marked this pull request as ready for review February 8, 2026 01:29
@dannywillems dannywillems force-pushed the copilot/deduplicate-version-info branch from 0c1997d to db172c7 Compare February 8, 2026 01:29
@dannywillems dannywillems changed the title [WIP] Fix hardcoded version in init.py for single source of truth Use importlib.metadata for version, single source of truth Feb 8, 2026
@dannywillems dannywillems merged commit 44e50e5 into main Feb 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate version: single source of truth

2 participants